#include <iostream>
using namespace std;

void getBits(int num, int count[10]){
	while(num > 0){
		count[num%10]++;
		num = num / 10;
	}
}

int main(){
	int n;
	cin >> n;
	int count[10]={0};
	for(int i = 1; i <= n; i++){
		getBits(i,count);
	}
	for(int i = 0; i <= 9; i++){
		cout << count[i] << endl;
	}
}
